<?php
namespace App\Http\Controllers;

class TestController extends Controller
{
	 public function pull()
    {
        $requestObj = app('request');
        $password = $requestObj->get('password');
        if ($password != md5('blogsecret')) {
            return 'password error!';
        }
        $codeDir = '/home/wwwroot/demo/';
        return shell_exec("cd $codeDir && /usr/local/git/bin/git pull origin master 2>>/tmp/gitlog.txt");
    }
}